<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<link rel="stylesheet" href="../res/css/weui.css" />
		<link rel="stylesheet" href="../res/css/weuix.css" />
		<link rel="stylesheet" href="../res/css/mp_common.css" />
		<link rel="stylesheet" href="../res/css/common.css" />
		<script src="../res/js/zepto.min.js"></script>
		<script src="../res/js/zepto.weui.js"></script>
		<script src="../res/js/mp_common.js?v=1"></script>
		<script src="../res/js/qrcode.min.js"></script>
		<script src="../res/js/common.js"></script>
		<script src="../res/js/JsBarcode.all.min.js" type="text/javascript"></script>
		<style type="text/css">
			.weui-cells {font-size: 14px;}
			.package-status{padding:18px 0 0 0;    width: 100%;}
			.package-status .status-list{margin:0;padding:0;margin-top:-5px;padding-left:8px;list-style:none;}
			.package-status .status-list li{border-left:2px solid #d9d9d9;text-align:left;}
			.package-status .status-list li:before{ /* 流程点的样式 */
				content:'';
				border:3px solid #f3f3f3;
				background-color:#d9d9d9;
				display:inline-block;
				width:10px;
				height:10px;
				border-radius:10px;
				margin-left:-9px;
				margin-right:10px
			}
			.package-status .status-list .latest:before{background-color:#0dad12;border-color:#f8e9e4;}
			.package-status .status-box{overflow:hidden}
			.package-status .status-list li{height:auto;}
			.package-status .status-list{margin-top:-8px}
			.package-status .status-box{position:relative}
			.package-status .status-box:before{content:" ";background-color:#f3f3f3;display:block;position:absolute;top:-8px;left:20px;width:10px;height:4px}
			.package-status .status-list{margin-top:0px;}
			/* .package-status .status-list .latest{border:none} */
			/* .package-status .status-list li{margin-bottom:-2px} */
			 
			 
			 
			.status-list li:not(:first-child){
				padding-top:10px;
			}
			 
			.status-content-before{
				text-align:left;
				margin-left:25px;
				margin-top:-20px;
			}
			.status-content-latest{
				text-align:left;
				margin-left:25px;
				color:green;
				margin-top:-20px;
			}
			.status-time-before{
				text-align:left;
				margin-left:25px;
				font-size:10px;
				margin-top:5px;
				
			}
			.status-time-latest{
				text-align:left;
				margin-left:25px;
				color:green;
				font-size:10px;
				margin-top:5px;
			}
			.status-line{
				border-bottom:1px solid #ccc;
				margin-left:25px;
				margin-top:10px;
				
			}
		</style>
	</head>
	<body>
		<div  class="fixed-top" style="padding: 7px 2px; background-color: #ffffff; font-size: 18px; ">
		    <div class="weui-flex__item">
		        <div class="placeholder">
		            <span class="icon icon-109" style=" margin-left: 8px;" onclick="ToPage()" >
		            </span><span style=" padding-left: 33%;">查看物流</span>
		        </div>  
		    </div>
		</div>
		<div class="weui-cells">
			<div class="weui-cell">
				<div class="weui-cell__bd">
				    <p id="p_pat_name">订单号</p>
				    <p id="p_pat_address">快递单号</p>
				</div>
			</div>
		</div>
		<div class="weui-cells">
			<div class="weui-cell">
				<div class="package-status">
					<div class="status-box" >
						<ul class="status-list">
						</ul>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		var user_id = getQst("user_id");
		var prescription_id = getQst("prescription_id").trim();
		$(function () {
			get_express()
		});
		// 获取物流信息
		function get_express() {
			var this_ = this;
			newAjaxPost("/h5/thirdParty/queryDeliveryInfo", {"order_num": prescription_id}, get_expressOK);
		}
		//回调
		function get_expressOK(jsonBack) {
			var this_ = this;
			var expressList = '';
			if (jsonBack.code == "1"){
				$("#p_pat_name").html('订单号：' + prescription_id)
				$("#p_pat_address").html('快递单号：' + jsonBack.data.number)
				if(jsonBack.data.list.length > 0){
					for(var i = 0;i < jsonBack.data.list.length;i++){
						if(i == 0){
							expressList += '<li class="latest">';
						}else{
							expressList += '<li>';
						}
						expressList += '<div class="status-content-before">' + jsonBack.data.list[i].status + '</div>';
						expressList += '<div class="status-time-before">' + jsonBack.data.list[i].time + '</div>';
						expressList += '<div class="status-line"></div>';
						expressList += '</li>';
					}
					$(".status-list").html(expressList)
				}else{
					$(".status-list").html("暂无物流信息")
				}
			}else{
				$(".status-list").html("暂无物流信息")
			}
		}
		
		//返回列表
		function ToPage() {
		    goPageNo(-1);
		}
	</script>
</html>
